package com.yc.dygang.mapper;

import com.yc.dygang.entity.Movie;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MovieMapper {
    @Insert("insert into dygang values (#{id},#{name},#{type},#{intime},#{image})")
    int insertMovie(Movie movie);

    @Select("select id from dygang where id = #{id}")
    String selectMovie(int id);

    @Select("select * from dygang order by intime desc")
    List<Movie> selectMovielist();
}
